package com.iplant.base.po.enums;

import java.util.ArrayList;
import java.util.List; 
import com.iplant.base.po.EnumItem;

public interface BaseEnum {
 
	int getValue();

	String getLabel();

	void setValue(int wValue);

	void setLabel(String wLabel);

	String getRemark();

	void setRemark(String remark);

	public static <T extends BaseEnum> List<EnumItem> getEnumList(T[] wValues) {

		List<EnumItem> wItemList = new ArrayList<EnumItem>();

		for (T type : wValues) {
			EnumItem wItem = new EnumItem();
			wItem.ID = type.getValue();
			wItem.Name = type.toString();
			wItem.Desc = type.getLabel();
			wItem.Remark = type.getRemark();
			wItemList.add(wItem);
		}

		return wItemList;
	}

}
